<?php
class admin_profiles extends Admin_Controller
{
	public $menu_id = 10;
	public function __construct()
	{
		parent::__construct();
		$this->load->model('profiles/profiles_model','profiles');		

	}
	
	public function index($id=FALSE){
		$id = login_data('id');
		$menu_id=$this->menu_id;				
		$data['rs'] = @$this->profiles->get_row($id);
		$this->template->build('index',$data);
		
	}



	public function save(){

		$menu_name = GetMenuProperty($menu_id,'title');
		$_POST['password'] =  $_POST['id']!='' && $_POST['password']=='' ? $_POST['current_password'] : $_POST['password'];
		$id = $this->profiles->save($_POST);	
		set_notify('success', lang('save_data_complete'));	
		redirect('admin_profiles');
		
	} 
}
?>